<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var arr=new Array();
        arr[0]="1";
        arr[1]="10";
        arr[2]="20";
        arr[3]="30";
        arr[4]="40";
        for(var i=0;i<arr.length;i++){
            console.log('第'+(i+1)+'位同学分数是' +arr[i]);
        }
        console.log('数组长度为:'+arr.length);
        
    </script>
</body>
</html>